CxRsmEditor Methods
The CxRsmEditor object contains the following methods:
Configure
The Configure method launches a Properties dialog box for the connected RSM service.
Syntax
Configure()
Example
The following example launches a Properties dialog box using Configure().
Connect
The Connect method connects to the specified RSM service.
Syntax
Connect(SiteService As String)
Parameters
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The RSM Site.Service to which you wish to connect. |
Example
The following example connects to CYGDEMO.RSM.
Sub
Dim CxRsmEditor
Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor")
CxRsmEditor.Connect("CYGDEMO.RSM")
End Sub
ControlService
The ControlService method starts, stops, or kills the specified service.
Syntax
ControlService(SiteService As String, Command As Unsigned Short) As Short
Parameters
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The Site.Service to control. Note: This service must be an entry in the RSM to which you have connected using Connect(). |
|
Command |
Yes |
The command to send to the service. Possible values are as follows.
|
Remark
A nonzero return value indicates an error controlling the service.
Example
The following example connects to CYGDEMO.RSM.
Sub
Dim CxRsmEditor
Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor")
CxRsmEditor.Connect("CYGDEMO.RSM")
CxRsmEditor.ControlService "CYGDEMO.UIS", 1
End Sub
Delete
The Delete method deletes the specified service.
Syntax
Delete(SiteService As String) As Short
Parameters
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The Site.Service to delete. Note: This service must be an entry in the RSM to which you have connected using Connect(). |
Remark
A nonzero return value indicates an error deleting the service.
Example
The following example deletes the CYGDEMO.OPCIS.
Disconnect
The Disconnect method disconnects from the specified RSM service.
Syntax
Disconnect()
Example
The following example disconnects from CYGDEMO.RSM.
Sub
Dim CxRsmEditor
Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor")
CxRsmEditor.Connect("CYGDEMO.RSM")
CxRsmEditor.Disconnect
End Sub
New
The New method launches a New RSM Entry dialog box for the connected RSM service.
Syntax
New(SiteService As String) As Short
Parameters
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The Site.Service returned by this method. This value is the new Site.Service name specified in the "Service Name" edit box of the New RSM Entry dialog box. |
Remark
A nonzero return value indicates an error creating a new service.
Example
The following example launches the New RSM Entry dialog box:
Properties
The Properties method invokes a Properties dialog box for the selected service(s) if the properties function is enabled.
Syntax
Properties(SiteService As String) As Short
Parameters
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The Site.Service for which to display properties. Note: This service must be an entry in the RSM to which you have connected using Connect(). |
Remark
A nonzero return value indicates an error displaying the properties.
Example
The following example launches a Properties dialog box for the CYGDEMO.PNT service.


